package iterator;

public class Iterator {
    public static void main(String[] args) {
        System.out.println("iterator");

        Collection_ list = new LinkList_();

        for(int i = 0;i<10;i++){
            list.add(new String(String.valueOf(i)));
        }

        System.out.println(list.size());

        // 遍历
        Iterator_ iterator = list.getIterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
